<include file="Public:header" />
<include file="Public:leftside" />
<style>
.file-item {
    float: left;
    position: relative;
    margin: 0 20px 20px 0;
    padding: 4px;
    background: #000;
}
</style>
<div class="main-content">
	<div class="breadcrumbs breadcrumbs-fixed" id="breadcrumbs"> 
		<ul class="breadcrumb">
			<li> <i class="icon-home home-icon"></i> <a href="/">首页</a> </li>
			<li><a href="/system/menu/">栏目管理</a></li>
			<li class="active">管理栏目</li>
		</ul>
	</div>
	<div class="page-content">
		<form action="/system/menuSave/" method="post" class="form form-horizontal" role="form">
            <input type="hidden" name="id" value="<?PHP echo $menuCurrent['id'];?>" />
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1">栏目名称</label>
				<div class="col-sm-9">
					<input type="text" id="form-field-1" datatype="required" data="栏目名称" placeholder="栏目名称" name="name" value="<?=$menuCurrent['name']?>" class="col-xs-10 col-sm-5" />
				</div>
			</div>
			<div class="space-4"></div>
	
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-2">所属平台</label>
	
				<div class="col-sm-2">
					<select name="type" id="menutype" class="width-80 form-control">
                    	<option value="0" <?PHP echo $admin_type=='0'?'selected':''; ?> >后台</option>
                    	<option value="1" <?PHP echo $admin_type=='1'?'selected':''; ?> >城市合伙人</option>
                    	<option value="2" <?PHP echo $admin_type=='2'?'selected':''; ?> >店铺管理</option>
                    </select>
				</div>
			</div>
			<div class="space-4"></div>
	
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-3">上级栏目</label>
				<div class="col-sm-2">
                	<select name="bclassid" id="bclassid" class="width-80 form-control">
                    	<option value="">请选择上级栏目</option>
                    	<php> if($_GET['id']){</php>
                        <volist name="menuArrayFlag" id="row">
                        	<?PHP if( $menuCurrent['bclassid']==$row['id'] ){ $bname = $row['name']; } ?>
                    	   <option value="<?=$row['id']?>" menuModule="<?=$row['module']?>" <?PHP echo $menuCurrent['bclassid']==$row['id']?'selected':''; ?> ><?=$row['name']?></option>
                        </volist>
                        <php> }</php>
						<php> if($_GET['tid']){</php>
                        <volist name="menuArrayFlag" id="row">
                        	<?PHP 
                        		if($_GET['tid']==$row['id']){ 
                        			$menuCurrent['module'] = $row['module']; 
                        		}
                        	?>
                    	   <option value="<?=$row['id']?>" menuModule="<?=$row['module']?>" <?PHP echo $_GET['tid']==$row['id']?'selected':''; ?> >
                    	   <?=$row['name']?>
                    	   </option>
                        </volist>
						 <php> }</php>
            			<input type="hidden" name="bname" id="bname" value="<?=$bname?>" />
                    </select>
				</div>
			</div>
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-4">栏目排序</label>
				<div class="col-sm-9">
					<input type="text" id="form-field-4" datatype="required" data="栏目排序" placeholder="栏目排序" name="sort" value="{$menuCurrent['sort']|default='0'}" class="col-xs-10 col-sm-2" />
				</div>
			</div>
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-5">栏目模块</label>
				<div class="col-sm-9">
					<input type="text" id="form-field-5" datatype="required" data="栏目模块" placeholder="栏目模块" name="module" value="<?=$menuCurrent['module']?>" class="col-xs-10 col-sm-2" />
				</div>
			</div>
			<div class="space-4"></div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-6">栏目操作</label>
				<div class="col-sm-9">
					<input type="text" id="form-field-6" datatype="required" data="栏目操作" placeholder="栏目操作" name="action" value="<?=$menuCurrent['action']?>" class="col-xs-10 col-sm-2" />
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-input-readonly">icon</label>
	
				<div class="col-sm-9">
					<input type="text" name="icon" value="<?=$menuCurrent['icon']?>" class="col-xs-10 col-sm-2" ><a style="height: 27px;display: block;float: left;line-height: 27px;padding: 0 7px;" href="http://fontawesome.dashgame.com/" target="_blank">查看图标</a>
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-input-readonly">自定义icon</label>
	
				<div class="col-sm-9">
					<div id="uploader" style="width:200px;overflow:hidden">
                      <div id="fileList" class="uploader-list">
                      <div id="WU_FILE_0" class="file-item thumbnail upload-state-done"><img class="img-responsive" src=""></div>
                      <input type="hidden" name="UpFilePathInfo" value="">
                     
                      </div>
                      <div id="cfilePicker">选择图片</div>
                  	</div>
				</div>
			</div>
	
			<div class="clearfix form-actions">
				<div class="col-md-offset-3 col-md-9">
					<button class="btn btn-info formSubmit" id="form" type="button"><i class="icon-ok bigger-110"></i>提交</button>
					&nbsp; &nbsp; &nbsp;
					<button class="btn" type="button" onclick="history.back(-1);"><i class="icon-undo bigger-110"></i>返回</button>
				</div>
			</div>
			
        </form>
    </div>


<script>
//全局变量
    var GV = {
         DIMAUB: "/",
        JS_ROOT: "NewAdmin/js/",
        TOKEN: ""
    };
</script>
<script type="text/javascript" src="/NewAdmin/js/webuploader/webuploader.js"></script>
<script type="text/javascript" src="/NewAdmin/js/webuploader/getting-started.js"></script>
<link rel="stylesheet" href="/NewAdmin/css/webuploader.css" />
<script src="/NewAdmin/js/wind.js"></script>
<link href="/NewAdmin/js/artDialog/skins/default.css" rel="stylesheet" />
<script src="/NewAdmin/js/zhlmy.js"></script>
<script type="text/javascript">
var BASE_URL = '/NewAdmin/js/webuploader/';
var UPLOAD_SERVER='{:U("User/uploadify_wb")}';
var UpFilePathInfo='<?=$menuCurrent['UpFilePathInfo']?>';
$(function() {
	$('#uploader img').attr('src',UpFilePathInfo);
	$(':input[name="UpFilePathInfo"]').val(UpFilePathInfo);
	$("#uploader").setUploader(null,{uploadImgType:'normal',thumb:{height:102}});
});
</script>
<include file="Public:footer" />